<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>

 <%@ page session="true" %>
 
 
 <%
 java.util.ArrayList accessos=(java.util.ArrayList)session.getAttribute("accessos");
 if (accessos==null)
	
    accessos=new java.util.ArrayList();
 accessos.add(new java.util.Date().toString());
 session.setAttribute("accessos", accessos);
 if (request.getParameter("invalidaSessio")!=null)
    session.invalidate();
 %>
 <html>
    <body>
        <form>
            <input type="submit" name="invalidaSessio" value="Invalida sessió"/>
            <input type="submit" value="Recarregar pàgina"/>
        </form> <br/>
        Has accedit a aquesta pàgina en els següents moments: <br>
 <%
    for (int i=0;i<accessos.size();i++) {
 %>
        <%= accessos.get(i) %> <br>
 <%
    }
 %>
    </body>
 </html>



</body>
</html>